home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / xf86Optrec.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-12  |  4.4 KB  |  110 lines

  1. /* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Optrec.h,v 1.11 2003/08/24 17:37:08 dawes Exp $ */
  2. /* 
  3.  * 
  4.  * Copyright (c) 1997  Metro Link Incorporated
  5.  * 
  6.  * Permission is hereby granted, free of charge, to any person obtaining a
  7.  * copy of this software and associated documentation files (the "Software"), 
  8.  * to deal in the Software without restriction, including without limitation
  9.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10.  * and/or sell copies of the Software, and to permit persons to whom the
  11.  * Software is furnished to do so, subject to the following conditions:
  12.  * 
  13.  * The above copyright notice and this permission notice shall be included in
  14.  * all copies or substantial portions of the Software.
  15.  * 
  16.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  19.  * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  20.  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
  21.  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  22.  * SOFTWARE.
  23.  * 
  24.  * Except as contained in this notice, the name of the Metro Link shall not be
  25.  * used in advertising or otherwise to promote the sale, use or other dealings
  26.  * in this Software without prior written authorization from Metro Link.
  27.  * 
  28.  */
  29. /*
  30.  * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
  31.  *
  32.  * Permission is hereby granted, free of charge, to any person obtaining a
  33.  * copy of this software and associated documentation files (the "Software"),
  34.  * to deal in the Software without restriction, including without limitation
  35.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  36.  * and/or sell copies of the Software, and to permit persons to whom the
  37.  * Software is furnished to do so, subject to the following conditions:
  38.  *
  39.  * The above copyright notice and this permission notice shall be included in
  40.  * all copies or substantial portions of the Software.
  41.  *
  42.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  43.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  44.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  45.  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  46.  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  47.  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  48.  * OTHER DEALINGS IN THE SOFTWARE.
  49.  *
  50.  * Except as contained in this notice, the name of the copyright holder(s)
  51.  * and author(s) shall not be used in advertising or otherwise to promote
  52.  * the sale, use or other dealings in this Software without prior written
  53.  * authorization from the copyright holder(s) and author(s).
  54.  */
  55.  
  56.  
  57. /* 
  58.  * This file contains the Option Record that is passed between the Parser,
  59.  * and Module setup procs.
  60.  */
  61. #ifndef _xf86Optrec_h_
  62. #define _xf86Optrec_h_
  63. #include <stdio.h>
  64.  
  65. /* 
  66.  * all records that need to be linked lists should contain a GenericList as
  67.  * their first field.
  68.  */
  69. typedef struct generic_list_rec
  70. {
  71.     void *next;
  72. }
  73. GenericListRec, *GenericListPtr, *glp;
  74.  
  75. /*
  76.  * All options are stored using this data type.
  77.  */
  78. typedef struct
  79. {
  80.     GenericListRec list;
  81.     char *opt_name;
  82.     char *opt_val;
  83.     int opt_used;
  84.     char *opt_comment;
  85. }
  86. XF86OptionRec, *XF86OptionPtr;
  87.  
  88.  
  89. XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val);
  90. XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
  91. void xf86optionListFree(XF86OptionPtr opt);
  92. char *xf86optionName(XF86OptionPtr opt);
  93. char *xf86optionValue(XF86OptionPtr opt);
  94. XF86OptionPtr xf86newOption(char *name, char *value);
  95. XF86OptionPtr xf86nextOption(XF86OptionPtr list);
  96. XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name);
  97. char *xf86findOptionValue(XF86OptionPtr list, const char *name);
  98. int xf86findOptionBoolean (XF86OptionPtr, const char *, int);
  99. XF86OptionPtr xf86optionListCreate(const char **options, int count, int used);
  100. XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail);
  101. char *xf86configStrdup (const char *s);
  102. int xf86nameCompare (const char *s1, const char *s2);
  103. char *xf86uLongToString(unsigned long i);
  104. void xf86debugListOptions(XF86OptionPtr);
  105. XF86OptionPtr xf86parseOption(XF86OptionPtr head);
  106. void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs);
  107.  
  108.  
  109. #endif /* _xf86Optrec_h_ */
  110.